<template>
  <a-drawer
    width="95%"
    :title="formTitle"
    :label-col="4"
    :wrapper-col="14"
    :visible="open"
    :body-style="{ height: 'calc(100vh - 100px)', overflow: 'auto' }"
    @close="cancel"
  >
    <a-card
      :bordered="false"
      style="margin-bottom: 10px; height: calc(100vh - 172px)"
    >
      <a-tabs
        @change="callback"
        v-model="form.detailsId"
        v-if="searchDetailsList.length > 0"
      >
        <a-tab-pane
          :key="item.url"
          :tab="item.name + (index + 1)"
          force-render
          v-for="(item, index) in searchDetailsList"
        >
          <iframe
            :src="item.url"
            style="
              height: calc(100vh - 272px);
              width: 100%;
              margin: 0;
              border: 0;
            "
          >
          </iframe>
        </a-tab-pane>
      </a-tabs>
      <a-row v-if="searchDetailsList.length === 0">
        <a-col
          :span="24"
          style="text-align: center; color: #ccc; margin-top: 200px"
        >
          <a-empty
            image="https://gw.alipayobjects.com/mdn/miniapp_social/afts/img/A*pevERLJC9v0AAAAAAAAAAABjAQAAAQ/original"
            :image-style="{
              height: '60px',
            }"
          >
          </a-empty>
        </a-col>
      </a-row>
    </a-card>

    <a-card :bordered="false">
      <div style="text-align: right; padding: 5px">
        <a-space>
          <a-button type="primary" @click="submitForm"> 选择该链接</a-button>
        </a-space>
      </div>
    </a-card>
  </a-drawer>
</template>
<script>
import BizSearchInfoEditForm from "./BizSearchInfoForm";
export default {
  ...BizSearchInfoEditForm,
};
</script>
